<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<script type="text/javascript">
			var contextPath = "${pageContext.request.contextPath}";
		</script>	
		<title>Design template - <spring:message code="app.title"/></title>

		<link rel="shortcut icon" href="${pageContext.request.contextPath}/resources/media/ico/favicon.ico" type="image/x-icon">
		
		<!-- Load external js -->
		<tiles:useAttribute name="extJs" id="extJs" classname="java.util.List"/>
		<c:forEach var="extJsItem" items="${extJs}">
			<script type="text/javascript" src="<tiles:insertAttribute value="${extJsItem}" flush="true" />"></script>
		</c:forEach>
		
		<!-- Load inner js files -->
		<tiles:useAttribute id="js" name="js" classname="java.util.List" />
		<c:forEach var="jsItem" items="${js}">
			<script type="text/javascript" src="${pageContext.request.contextPath}/<tiles:insertAttribute value="${jsItem}" flush="true" />"></script>
		</c:forEach>
		
		<!-- Load css files -->
		<tiles:useAttribute id="css" name="css" classname="java.util.List" />
			<c:forEach var="cssItem" items="${css}">
				<link rel="stylesheet" href="${pageContext.request.contextPath}/<tiles:insertAttribute value="${cssItem}" flush="true" />" type="text/css">
		</c:forEach>
		
</head>
<body>

	<tiles:insertAttribute name="design" />

</body>
</html>